import request from '@/utils/request'

// 查询问卷调查列表
export function listLpQuestionnaireInvestigation(query) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/list',
    method: 'get',
    params: query
  })
}

// 查询问卷调查详细
export function getLpQuestionnaireInvestigation(id) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/' + id,
    method: 'get'
  })
}

// 保存问卷调查
export function saveLpQuestionnaireInvestigation(data) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/save',
    method: 'post',
    data: data
  })
}

// 删除问卷调查
export function delLpQuestionnaireInvestigation(id) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/' + id,
    method: 'delete'
  })
}

// 导出问卷调查
export function exportLpQuestionnaireInvestigation(query) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/export',
    method: 'get',
    params: query
  })
}

// 邀请答题生成邀请数据
export function saveDataBySetIdAndInvestId(data) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/saveDataBySetIdAndInvestId',
    method: 'post',
    data: data
  })
}

// 批量保存问题及答案
export function saveProblem(data) {
  return request({
    url: '/investigation/lpQuestionnaireInvestigation/saveProblem',
    method: 'post',
    data: data
  })
}
